﻿<%@ Page Language="C#" MasterPageFile="~/adm_vlg/Admin_master.master" AutoEventWireup="true"
    CodeFile="adminOrder.aspx.cs" Inherits="adm_vlg_adminOrder" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>Quản trị Danh Mục</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="Server">
    <script type="text/javascript">
        $(function () {

            $('.delete').click(function () {
                var answer = confirm('Xóa bài viết sẽ xóa cả đơn hàng, Bạn muốn xóa bài viết này?');
                return answer // answer is a boolean
            });
        })

    </script>
    <div id="toolbar">
        <div class="image">
            <img src="img/icon-48-category.png" /></div>
        <div class="text">
            QUẢN LÝ ĐƠN HÀNG</div>
        <div class="tool">
            <table>
                <tbody>
                    <tr>
                        <td>
                            <%-- <a href="categoryEdit.aspx?action=add"><span class="button icon-32-new"></span>Thêm
                                mới</a>--%>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="clear">
        </div>
    </div>
    <%-- <asp:DropDownList ID="drp_cat" runat="server" AutoPostBack="True" OnSelectedIndexChanged="drp_cat_SelectedIndexChanged">
    </asp:DropDownList>
    <br />
    <br />--%>
    <div class="List" style="overflow: auto">
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" AllowPaging="True"
            Width="100%" EmptyDataText="Không có công dữ liệu " AllowSorting="True" OnPageIndexChanging="GridView1_PageIndexChanging"
            PageSize="14" CssClass="adminlist">
            <Columns>
                <asp:TemplateField HeaderText="STT">
                    <ItemTemplate>
                        <%# Container.DataItemIndex + 1 %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Ngày đặt">
                    <ItemTemplate>
                        <%# string.Format("{0:dd/MM/yyyy}", Eval("NgayDat"))%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Người đặt">
                    <ItemTemplate>
                        <%#Eval("VLGAccount.UsernameE") %>
                        <%-- <%#Eval("Duyet")!=null?Eval("Duyet").ToString().Equals("True")? "Đã duyệt":"Không duyệt":"Chờ duyệt" %>--%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Người giao">
                    <ItemTemplate>
                        <%#Eval("Gig.VLGAccount.UsernameE") %>
                        <%--  <%#Eval("Duyet")!=null?Eval("Duyet").ToString().Equals("True")? "Đã duyệt":"Không duyệt":"Chờ duyệt" %>--%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Trạng thái">
                    <ItemTemplate>
                        <%#Eval("StatusStr") %>
                        <asp:LinkButton Visible='<%#(Eval("CustomerConfirm").ToString().Equals("True"))&& (Eval("SellerConfirm").ToString().Equals("True"))&&(!Eval("DaThanhToan").ToString().Equals("True")) %>'
                            ID="linkEditG" runat="server" PostBackUrl='<%# Eval("idDH","adminOrderDetails.aspx?id={0}") %>'>| Thanh toán</asp:LinkButton>
                        <%-- <asp:LinkButton ID="linkEditG" runat="server" PostBackUrl='<%# Eval("idDH","adminOrderDetails.aspx?id={0}") %>'>Thanh toán trả lại</asp:LinkButton>--%>
                        <%--|
                        <asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl='<%# Eval("idGig","gigDetails.aspx?id={0}") %>'>Kiểm duyệt</asp:LinkButton>
                        |
                        <asp:LinkButton CssClass="" ID="LinkButton2" runat="server" PostBackUrl='<%# Eval("idGig","gigDetails.aspx?action=delete&id={0}") %>'>Xóa</asp:LinkButton>--%>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
</asp:Content>
